﻿using System;
using System.ComponentModel.DataAnnotations;

namespace GuRenFang.Service.Entity
{
   public class Messages
    {
        [Key]
        public int Id { get; set; }

        [Required(ErrorMessage = "请填写标题")]
        [StringLength(100, ErrorMessage = "标题必须在50个字符范围内")]
        public string Title { get; set; }

        [Required(ErrorMessage = "请填写内容")]
        [StringLength(400, ErrorMessage = "内容必须在200个字符范围内")]
        public string Content { get; set; }

        public DateTime CreatedTime { get; set; }

       [StringLength(50, ErrorMessage = "必须在50个字符范围内")]
        public string SenderEmail { get; set; }

       [StringLength(50, ErrorMessage = "必须在50个字符范围内")]
        public string SenderName { get; set; }
    }
}
